<template>
  <div class="demo2">
    <Button v-for="(item,index) in list" :key="index" @click="btnClick(index)">

      {{item}}
    </Button>
  </div>

</template>

<script>
  export default {
    name: 'demo2',
    components: {},
    props: {},
    data() {
      return {
        list: [
          1, 2, 3, 4, 5
        ]
      };
    },
    mounted() {
    },
    methods: {
      btnClick(index) {
        alert(index)

      }
    },
    computed: {}
  };
</script>

<style scoped lang="scss">
  .demo2 {
  }
</style>
<style lang="scss">
  .demo2 {
  }
</style>
